<template>
	<view>
		<global-navgation  title="新品推荐"></global-navgation>
		<view class="top">
			<image src="../../static/images/57.png" mode=""></image>
			<input class="search" placeholder="请输入关键字搜索">
			
			
			</input>
		</view>
		<view class="list" v-for="(item,index) in lists">
			<image :src="item.cover_img" mode=""></image>
			<text class="text1">{{item.title}}</text>
			<text class="text2">{{item.sub_title}}</text>
		</view>
	</view>
</template>
<script>
	import globalNavgation from '../../components/globalNavgation.vue'
	export default{
		components:{
			globalNavgation
		},
		mounted(){
			// 初始化获取数据
			this.__initClassData()	
		},
		onLoad(){
			uni.getStorage({
			    key: 'token',
			    success:  res=> {
					this.tokens=res.data
					console.log('mmm',this.tokens)
			    }
			});
		},
		methods:{
			__initClassData() {
				this.$api.get({
					url: '/article/article/newGoods_list',
					data:{token:this.tokens}
				}).then(res => {
						this.lists=res.data
						
						
						console.log(this.lists)
					})
				},
		},
		data(){
			return{
				lists:[],
				tokens:''
			}
		},
	}
</script>
<style>
	.top{
			width: 100%;
			height: 108rpx;
			background: #F7F7F7;
			position: relative;
		}
		.top .search {
			width: 686rpx;
			height: 68rpx;
			position: absolute;
			top: 20rpx;
			left: 32rpx;
			background: #FFFFFF;
			border: 1px solid rgba(151, 151, 151, 0.1);
			box-sizing: border-box;
			border-radius: 16rpx;
			background-origin: content-box;
			text-indent: 72rpx;
	/* 		background: url(../../static/images/57.png) no-repeat 36rpx 22rpx;
			background-size: 24rpx 24rpx;
			background-position: left; */
			
		}
		.top image{
			width: 24rpx;
			height: 24rpx;
			position: absolute;
			top: 42rpx;
			left: 68rpx;
			z-index: 2;
		}
		.list .text1{
			font-family: PingFang SC;
			font-style: normal;
			font-weight: 800;
			font-size: 36rpx;
			line-height: 50rpx;
			height: 50rpx;
			position: absolute;
			top:30rpx;
			left: 206rpx;
			color: rgba(0, 0, 0, 0.85);
		}
		.list .text2{
			width: 512rpx;
			height: 80rpx;
			position: absolute;
			top: 96rpx;
			left: 206rpx;
			font-family: PingFang SC;
			font-style: normal;
			font-weight: normal;
			font-size: 28rpx;
			line-height: 40rpx;
			color: rgba(0, 0, 0, 0.45);
			
		}
		.list{
			width: 750rpx;
			height: 206rpx;
			position: relative;
		}
		.list image{
			width: 150rpx;
			height: 150rpx;
			position: absolute;
			top: 28rpx;
			left: 32rpx;
		}
</style>